#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021, Jeff McBride
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# -----------------------------------------------------------------------------

def init(module):
    module.name = ":board:samg55-xplained-pro"
    module.description = "Microchip SAMG55 Xplained Pro"

def prepare(module, options):
    if not options[":target"].partname == "samg55j19a-au":
        return False

    module.depends(
        ":platform:clockgen",
        ":platform:usart:7",
        ":platform:gpio",
        ":platform:core",
        ":platform:usb",
        ":io")
    return True

def build(env):
    env.outbasepath = "modm/src/modm/board"
    env.copy('board.hpp')

    # TODO: openocd config?
